<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<style>
    .bootbox-close-button {
        width: 19px;
        height: 19px;
        border: none;
        cursor: pointer;
        -webkit-appearance: none;
        float: right;
        top: 4px;
        left: -5px;
        position: relative;
        background: #E9F5FF url("assets/img/nav-img/icon_close.png") no-repeat 0 0;
    }

    .bootbox .modal-dialog {
        width: 50% !important;
    }

    .modal-content {
        width: 100%;
    }

    input, select, .form-control {
        height: 30px;
    }

    .myDialogDetail label {
        margin-bottom: 0px !important;
    }

    .detailDialogStyle {
        line-height: 30px;
        margin-bottom: 15px;
    }

    .myDialogDetail1 .modal-body {
        padding-bottom: 0px !important;
        border-bottom-right-radius: 5px !important;
        border-bottom-left-radius: 5px !important;
    }
</style>
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <form class="editForm" action="${saveUrl}" method="post" responseType="JSON" role="form"
              id="editForm_${serializeNum}"
              data-bv-submitButtons="#editFormSubmitBtn_${serializeNum}"
              data-bv-message="This value is not valid"
              data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
              data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
              data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
            <input type="hidden" name="id" value="${editEntity.id}">
            <input type="hidden" name="memberPackageId" class="memberPackageId" value="${memberPackageId}">


                <div class="col-xm-12 col-sm-6 col-lg-12 margin-top-30">
                    <div class="form-group">
                        <label for="days" class="col-sm-2 col-sm-offset-2 control-label no-padding-right">延期天数：</label>
                        <label class="col-sm-6">
                            <label>
                                <input data-bv-integer-message="The field is number"
                                       data-bv-message="The field is not valid" data-bv-integer="true" size="11"
                                       name="days"
                                       alt="延期天数" id="days" placeholder="延期天数" type="text" title="" class="form-control"
                                       value="${editEntity.days}"/>
                            </label>
                            <label>
                                (已延期${postponeCount}次)
                            </label>
                        </label>
                    </div>
                </div>
                <div class="col-xm-12 col-sm-6 col-lg-12">
                    <div class="form-group">
                        <label for="remark" class="col-sm-2 col-sm-offset-2 control-label no-padding-right">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</label>
                        <div class="col-sm-6">
                            <textarea class="form-control" name="remark" size="500" rows="3" style="resize:none"
                                      id="remark"  data-bv-field="remark" value="${editEntity.remark}"></textarea>
                        </div>
                    </div>
                </div>
            <div class="col-sm-12 text-align-center margin-top-20">
                <button style="width: 80px;margin-right: 20px" type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">确定</button>
                <input style="width:80px;" type="button" class="btn btn-blue" data-dismiss="modal" value="取消" />

            </div>
        </form>
    </div>
</div>
<script src="assets/js/validation/bootstrapValidator_init.js"></script>
<script>
    $(".selectpicker_${serializeNum}").select2();
    $("#editForm_${serializeNum}").bind("ajaxSubmitCallback", function (event, result) {
        if (result.resCode == 200) {
            bootbox.hideAll();
            logger.info("保存成功", true);
        } else {
            logger.error("保存失败");
        }
    });
</script>